﻿using UnityEngine;

namespace ZerAx.Tweaks
{
    public static class UnityEngineExtensions
    {
        public static Vector2 ToVec(this (float, float) v) => new(v.Item1, v.Item2);
        public static Vector2Int ToVec(this (int, int) v) => new(v.Item1, v.Item2);
        public static Vector3 ToVec(this (float, float, float) v) => new(v.Item1, v.Item2, v.Item3);
        public static Vector3Int ToVec(this (int, int, int) v) => new(v.Item1, v.Item2, v.Item3);
        public static (float, float) ToTuple(this Vector2 v) => (v.x, v.y);
        public static (int, int) ToTuple(this Vector2Int v) => (v.x, v.y);
        public static (float, float, float) ToTuple(this Vector3 v) => (v.x, v.y, v.z);
        public static (int, int, int) ToTuple(this Vector3Int v) => (v.x, v.y, v.z);
    }
}
